SAP Variant JumpStart Guide

This guide is designed to get you familiar with SAP ABAP variant handling, without going through the different parts of the documentation. At the end of this walk through you will find links to relevant topics for each step, should you wish to customize the setup.

Prerequisites

  1. The FQDN of the SAP system or its IP address as well as the system number.
  2. An SAP username and password and client with the require SAP authorizations. See SAP RFC user privileges for more information.

Process Flow

  1. Create an SAP System connection to an SAP system
  2. Import the SAP ABAP programs to execute
  3. Import The SAP ABAP program variants to maintain
  4. Schedule the SAP ABAP program with variant
  5. Create a variant in Redwood Server
  6. Schedule the SAP ABAP program with temporary variant
  7. Store the variant in SAP
  8. Modify the variant in Redwood Server and schedule the SAP ABAP program in SAP with the modified variant

Connect to SAP

  1. Navigate to Environment > SAP
  2. Choose New SAP system from the context menu.
  3. Specify the SAP SID in the Name field.
  4. Specify the connection string using FQDN hostname of the SAP system and system number (ASHOST=... SYSNR=..), for example ASHOST=d00.example.com SYSNR=00.
  5. Select a time zone in the Default Job Time Zone field.
  6. On the XBP tab, choose Add, specify the desired SAP client in the Client Number field, for example 100, the username and password in the relevant fields, check Default Client, and choose Check Connection Settings.
  7. If the connection settings are valid, choose Save & Close.
  8. Navigate to Environment > Process Servers and choose Start. If the Process Server reaches status Running, the connection is established.

Import SAP ABAP Programs

  1. Navigate to Definitions > Processes, fill SAP_Import into the search field, choose Submit from the context menu of SAP_ImportAbapPrograms.
  2. In the SAP System field, select your SAP system, in the ABAP Program field, fill RSPFPAR and choose Submit and Submit.

Import SAP ABAP Variant for RSPFPAR

  1. Navigate to Definitions > Processes, fill SAP_Import into the search field, choose Submit from the context menu of SAP_ImportVariant.
  2. In the SAP System field, select your SAP system, in the ABAP Program field, select RSPFPAR, in the ABAP Variant field, select SAP&_AUTH

Schedule the ABAP Program with Variant

  1. Navigate to Definitions > Processes.
  2. Fill SAP_ABAP_RUN into the search field, choose Submit from the context menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fill Get profile parameters in the SAP Job Name field, select RSPFPAR in the ABAP Program field, and select 'SAP&AUTH' in ABAP Variant.
  3. On the Job Output Parameters tab, select Yes in the Delete job when finished field.
  4. Choose Submit, choose Monitor related processes from the context menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.

Create the ABAP Variant in Redwood Server

  1. Navigate to Environment > SAP, choose Maintain Objects from the context menu of your SAP System.
  2. In the Maintain Objects dialog, expand ABAP Programs, choose New Variant from the context menu of RSPFPAR / Display Profile Parameter.
  3. Select your client in the Client Number field, fill Redwood into the Name field, choose Save.
  4. Choose New Select Option from the context menu, select PNAME in the Name field.
  5. On the Values tab, choose Add, select BT in the Option field, fill login/* into the Low and oz* in the High fields and choose Save & Close.

Schedule the SAP ABAP Program with Temporary Variant

  1. Navigate to Definitions > Processes.
  2. Fill SAP_ABAP_RUN into the search field, choose Submit from the context menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fill Get profile parameters in the SAP Job Name field, select RSPFPAR in the ABAP Program, Redwood in the ABAP Variant, and select Yes in the Create Temporary Variant? fields.
  3. On the Job Output Parameters tab, select Yes in the Delete job when finished field.
  4. Choose Submit, choose Monitor related processes from the context menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.

Note: When the variant exists in Redwood server and not in the SAP system, you set the Create Temporary Variant? field to Yes. This is also required when the variant exists in both, parameters or select options differ, and you want to use the values stored in Redwood Server.

Store the ABAP Variant in SAP

  1. Navigate to Definitions > Processes.
  2. Fill SAP_ABAP_RUN into the search field, choose Submit from the context menu of SAP_StoreVariant, select your SAP system in the SAP System field, your client in the Client field, select RSPFPAR in the ABAP Program, and Redwood in the ABAP Variant field; ensure If Variant Already Exists in the SAP System is set to Fail.
  3. Choose Submit, choose Monitor related processes from the context menu of SAP_StoreVariant, if the process status Completed, move on to the next step, if the status is Error, inspect stderr.log under Files, ensure that it states: Variant REDWOOD of ABAP program RSPFPAR already exists. Failed.
  4. Open SAPGui, open transaction SE38, fill RSPFPAR into the Program field, select Variants and choose Display.
  5. Fill Redwood in the Variant field and choose Display, you should see the variant information specified above.

Modify the variant in Redwood Server

  1. Navigate to Environment > SAP, choose Maintain Objects from the context menu of your SAP System.
  2. In the Maintain Objects dialog, expand ABAP Programs, RSPFPAR / Display Profile Parameter, your client number, and RSPFPAR, select PNAME.
  3. On the Values tab, select CP in the Option field, replace the contents of the Low field with ms/* and delete the contents of the High field.
  4. Navigate to Definitions > Processes.
  5. Fill SAP_ABAP_RUN into the search field, choose Submit from the context menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fill Get profile parameters in the SAP Job Name field, select RSPFPAR in the ABAP Program, Redwood in the ABAP Variant, and select Yes in the Create Temporary Variant? fields.
  6. On the Job Output Parameters tab, select Yes in the Delete job when finished field.
  7. Choose Submit, choose Monitor related processes from the context menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.
  8. Notice that we now have the message server-related and no longer the login-related profile parameters as we use the Redwood Server variant to create a temporary variant.
  9. Navigate to Definitions > Processes.
  10. Fill SAP_ABAP_RUN into the search field, choose Submit from the context menu of SAP_AbapRun, select your SAP system in the SAP System field, your client in the Client field, fill Get profile parameters in the SAP Job Name field, select RSPFPAR in the ABAP Program, Redwood in the ABAP Variant, and select No in the Create Temporary Variant? fields.
  11. On the Job Output Parameters tab, select Yes in the Delete job when finished field.
  12. Choose Submit, choose Monitor related processes from the context menu of SAP_AbapRun, once the process has reached status Completed, inspect step1_spool1.txt under Files.
  13. Notice that we now have the login-related and no longer the message server-related profile parameters as we use the variant in SAP and not the one stored in Redwood Server.

Further Reading